System and methods for detecting malicious email transmission

ABSTRACT

A system and methods of detecting an occurrence of a violation of an email security policy of a computer system. A model relating to the transmission of prior emails through the computer system is defined which is derived from statistics relating to the prior emails. For selected emails to be analyzed, statistics concerning the selected email are gathered. Such statistics may refer to the behavior or other features of the selected emails, attachments to emails, or email accounts. The determination of whether a violation of an email security policy has occurred is performed by applying the model of prior email transmission to the statistics relating to the selected email. The model may be statistical or probabilistic. A model of prior email transmission may include grouping email recipients into cliques. A determination of a violation of a security policy may occur if email recipients for a particular email are in more than one clique.

CLAIM FOR PRIORITY TO RELATED APPLICATIONS

This application claims priority from and is a continuation of U.S.patent application Ser. No. 10/222,632 filed on Aug. 16, 2002 now U.S.Pat. No. 7,657,935 entitled “System and Methods for Detecting MaliciousEmail Transmission,” which itself claims the benefit of U.S. ProvisionalPatent Application Ser. No. 60/340,197, filed on Dec. 14, 2001, entitled“System for Monitoring and Tracking the Spread of Malicious E-mails,”and U.S. Provisional Patent Application Ser. No. 60/312,703, filed Aug.16, 2001, entitled “Data Mining-Based Intrusion Detection System,” whichare hereby incorporated by reference in their entirety herein.

STATEMENT OF GOVERNMENT RIGHT

The present invention was made in part with support from United StatesDefense Advanced Research Projects Agency (DARPA), grant no.F30602-00-1-0603. Accordingly, the United States Government may havecertain rights to this invention.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by any one of the patentdisclosure, as it appears in the Patent and Trademark Office patentfiles or records, but otherwise reserves all copyright rightswhatsoever.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to systems and methods for detecting violationsof an email security policy in a computer system, and more particularlyto the use of probabilistic and statistical models to model the behaviorof email transmission through the computer system.

2. Background

Computer systems are constantly under attack by a number of maliciousintrusions. For example, malicious software is frequently attached toemail. According to NUA Research, email is responsible for the spread of80 percent of computer virus infections (Postini Corporation, Pressrelease “Postini and Trend Micro Partner to Offer Leading VirusProtection Via Postini's Email Pre-processing Infrastructure,” OnlinePublication, 2000. http://www.postini.com/company/pr/pr100200.html.)Various estimates place the cost of damage to computer systems bymalicious email attachments in the range of 10-15 billion dollars in asingle year. Many commercial systems have been developed in an attemptto detect and prevent these attacks. The most popular approach to defendagainst malicious software is through anti-virus scanners such asSymantec and McAfee, as well as server-based filters that filters emailwith executable attachments or embedded macros in documents (SymantecCorporation, 20330 Stevens Creek Boulevard, Cupertino, Calif. 95014,Symantec worldwide home page, Online Publication, 2002.http://www.symantec.com/product, and McAfee.com Corporation, 535 OakmeadParkway, Sunnyvale, Calif. 94085, Macafee home page. Online Publication,2002. http://www.mcafee.com).

These approaches have been successful in protecting computers againstknown malicious programs by employing signature-based methods. However,they do not provide a means of protecting against newly launched(unknown) viruses, nor do they assist in providing information that myhelp trace those individuals responsible for creating viruses. Onlyrecently have there been approaches to detect new or unknown malicioussoftware by analyzing the payload of an attachment. The methods usedinclude heuristics, (as described in Steve R. White, “Open problems incomputer virus research,” Online publication,http://www.research.ibm.com/antivirus/SciPapers/White/Problems/Problems.html),neural networks (as described in Jeffrey O. Kephart, “A biologicallyinspired immune system for computers,” Artificial Life IV, Proceedingsof the Fourth International Workshop on Synthesis and Simulation ofLiving Systems, Rodney A. Brooks and Pattie Maes, eds. pages 130-193,1994), and data mining techniques (as described in Matthew G. Schultz,Eleazar Eskin, Erez Zadok, and Salvatore J. Stolfo, “Data Mining MethodsFor Detection Of New Malicious Executables,” Proceedings of the IEEESymposium on Security and Privacy, Oakland, Calif., May 2001, andSalvator J. Stolfo, Erez Zadok, Manasi Bhattacharyya, Matthew G.Schultz, and Eleazar Eskin “MEF: Malicious Email Filter: a Unix MailFilter That Detects Malicious Windows Executables,” Online publications,http://www.cs.columbia.edu/ids/mef/rel papers.html). An email filterwhich detects malicious executables is described in Schultz et al. U.S.patent application No. [not yet known], filed Jul. 30, 2002, entitled“System and Methods for Detection of New Malicious Executables,” whichis incorporated by reference in its entirety herein.

In recent years however, not only have computer viruses increaseddramatically in number and begun to appear in new and more complexforms, but the increased inter-connectivity of computers has exacerbatedthe problem by providing the means of fast viral propagation.

Moreover, violations in email security policies have occurred which aremarked by unusual behaviors of emails or attachments. For example, spamis a major concern on the internet. More than simply an annoyance, itcosts corporations many millions of dollars in revenue because spamconsumes enormous bandwidth and mail server resources. Spam is typicallynot detected by methods that detect malicious attachments, as describedabove, because spam typically does not include attachments.

Other email security violations may occur where confidential informationis being transmitted by an email account to at least one improperaddressee. As with spam, such activity is difficult to detect where noknown viruses are attached to such emails.

Accordingly, there exists a need in the art for a technique to detectviolations in email security policies which can detect unauthorized usesof email on a computer system and halt or limit the spread of suchunauthorized uses.

SUMMARY

An object of the present invention is to provide a technique fordetecting violations of email security policies of a computer system bygathering statistics about email transmission through a computer system.

Another object of the present invention is to provide a technique formodeling the behavior of attachments and/or modeling of the behavior ofemail accounts on a computer system.

A further object of the present invention is to provide a technique forgenerating and comparing profiles of normal or baseline email behaviorfor an email account and for selected email behavior and for determiningthe difference between such profiles, and whether such differencerepresents a violation of email security policy.

A still further object of the invention is to protect the identity ofemail account users, while tracking email behavior associated with suchusers.

These and other objects of the invention, which will become apparentwith reference to the disclosure herein, are accomplished by a systemand methods for detecting an occurrence of a violation of an emailsecurity policy of a computer system by transmission of selected emailthrough the computer system. The computer system may comprise a serverand one or more clients having an email account. The method comprisesthe step of defining a model relating to prior transmission of emailthrough the computer system derived from statistics relating to theprior emails, and the model is saved in a database. The model may beprobabilistic or statistical. Statistics may be gathered relating to thetransmission of the selected email through the computer system. Theselected email may be subsequently classified as violative of the emailsecurity policy based on applying the model to the statistics.

In a preferred embodiment, the step of defining a model comprisesdefining a model relating to attachments to the prior emails transmittedthrough the computer system. Such model may created by using a NaiveBayes model trained on features of the attachment. New attachments areextracted from each of the new emails transmitted through the computersystem. The attachment may be identified with a unique identifier.According to this embodiment, the step of gathering statistics relatingto the transmission of new email through the computer system comprisesrecording the number of occurrences of the attachment received by theclient.

The step of gathering statistics relating to the transmission of newemail through the computer system may comprise, for each attachment thatis transmitted by an email account, recording a total number ofaddresses to which the attachment is transmitted. This step may alsoinclude recording a total number of email accounts which transmit theattachment. In addition, this step may include, for each attachment thatis transmitted by an email account, defining a model that estimates theprobability that an attachment violates an email security policy basedon the total number of email addresses to which the attachment istransmitted and the total number of email accounts which transmit theattachment.

The step of classifying the email may be performed at the client.Alternatively or in addition, the step of classifying the email may beperformed at the server. The classification determined at the server maybe transmitted to the one or more clients. In addition, theclassification determined at the client may be transmitted to theserver, and retransmitted to the one or more clients in the system.

According to another embodiment, the step of defining a model relatingto prior transmission of email may comprise defining model derived fromstatistics relating to transmission of emails from one of the emailaccounts. A model may be derived from statistics accumulated over apredetermined time period. For example, a model may be defined relatingthe number of emails sent by an email account during a predeterminedtime period. A model may alternatively be derived from statisticsaccumulated irrespective of a time period. For example, a model may bederived relating to the number of email recipients to which the emailaccount transmits an email. In an exemplary embodiment, such models arerepresented as histograms. The step of gathering statistics about thetransmission of selected email may comprise representing suchtransmission of selected email as a histogram. Classifying thetransmission of selected email may comprise comparing the histogram ofprior email transmission with the histogram of selected emailtransmission. The comparison may be performed by such techniques asMahalonobis distance, the Chi-Square test, or the Kolmogorov-Simironovtest, for example.

Advantageously, the step of defining a model relating to transmission ofemails from one of the email accounts may comprise defining the modelbased on the email addresses of recipients to which the emails aretransmitted by the email account. Accordingly, the email addresses maybe grouped into cliques corresponding to email addresses of recipientshistorically occurring in the same email. The step of gatheringstatistics relating to the transmission of email through the computersystem may comprise, for email transmitted by the email account,gathering information on the email addresses of the recipients in eachemail. The email may be classified as violating the email securitypolicy based on whether the email addresses in the email are members ofmore than one clique.

The step of defining a model relating to transmission of emails from oneof the email accounts may comprise, for emails transmitted from theemail account, defining the model based on the time in which the emailsare transmitted by the email account. Alternatively, the model may bebased on the size of the emails that are transmitted by the emailaccount. As yet another alternative, the model may be based on thenumber of attachments that are transmitted by the email account

The client may comprise a plurality of email accounts and the step ofdefining a model relating to prior transmission of email may comprisedefining a model relating to statistics concerning emails transmitted bythe plurality of email accounts. According to this embodiment, the stepof defining a probabilistic model may comprise defining a model based onthe number of emails transmitted by each of the email accounts. Themodel may also be defined based on the number of recipients in eachemail transmitted by each of the email accounts.

In accordance with the invention, the objects as described above havebeen met, and the need in the art for a technique which detectsviolations in an email security policy by modeling the emailtransmission through the computer system, has been satisfied.

BRIEF DESCRIPTION OF THE DRAWINGS

Further objects, features and advantages of the invention will becomeapparent from the following detailed description taken in conjunctionwith the accompanying figures showing illustrative embodiments of theinvention, in which:

FIG. 1 is a chart illustrating a system in accordance with the presentinvention.

FIGS. 2A-2C (collectively “FIG. 2” herein) depict a screen of the userinterface, illustrating information displayed concerning emailstransmitted through the system in accordance with the present invention.

FIGS. 3A-3B (collectively “FIG. 3” herein) depict another screen of theuser interface, illustrating further information displayed concerningemails transmitted through the system in accordance with the presentinvention.

FIGS. 4A-4B (collectively “FIG. 4” herein) depict yet another screen ofthe user interface, illustrating information displayed concerningattachments to emails transmitted through the system in accordance withthe present invention.

FIGS. 5A-5B (collectively “FIG. 5” herein) depict a further screen ofthe user interface, illustrating information displayed concerning emailaccounts in accordance with the present invention.

FIG. 6 is a screen of the user interface, illustrating histograms ofemail transmission by an email account in accordance with the presentinvention.

FIG. 7 is a sample chart illustrating the relationship of email accountsand emails between various email accounts on a system in accordance withthe present invention.

FIG. 8 is a screen of the user interface, illustrating informationdisplayed concerning groups or cliques of email accounts in accordancewith the present invention.

FIGS. 9A-9B (collectively “FIG. 9” herein) depict another screen of theuser interface, illustrating information displayed concerning emailsstatistics of an email account in accordance with the present invention.

Throughout the figures, the same reference numerals and characters,unless otherwise stated, are used to denote like features, elements,components or portions of the illustrated embodiments. Moreover, whilethe subject invention will now be described in detail with reference tothe figures, it is done so in connection with the illustrativeembodiments. It is intended that changes and modifications can be madeto the described embodiments without departing from the true scope andspirit of the subject invention as defined by the appended claims.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

This invention will be further understood in view of the followingdetailed description.

In accordance with the invention, a system and method for a violation ofan email security policy of a computer system is disclosed herein. Aviolation of an email security policy can be defined in several ways.Such an email security policy may be explicit or implicit, and generallyrefers to any activity which may be harmful to the computer system. Forexample, an attachment to an email which contains a virus may beconsidered a violation of a security policy. Attachments which containviruses can manifest themselves in several ways, for example, bypropagating and retransmitting themselves. Another violation of asecurity policy may be the act of emailing attachments to addresses whodo not have a need to receive such attachments in the ordinary course.Alternatively, the security policy may be violated by “spam” mail, whichare typically unsolicited emails that are sent to a large number ofemail accounts, often by accessing an address book of a host emailaccount. The method disclosed herein detects and tracks such securityviolations in order to contain them.

A model is defined which models the transmission of prior email throughthe computer system through the computer system. The model may bestatistical model or a probabilistic model. The transmission of emails“through” the system refers to emails transmitted to email accounts inthe system, email transmitted by email accounts in the system, andbetween email accounts within the system. The system accumulatesstatistics relating to various aspects of email traffic flow through thecomputer system. According to one embodiment, the model is derived fromobserving the behavior or features of attachments to emails. Anotherembodiment concerns modeling the behavior of a particular email account.Yet another embodiment models the behavior of the several email accountson the system to detect “bad” profiles. The model is stored on adatabase, which may be either at a client or at a server, or at bothlocations.

The selected email transmission is typically chosen for some recent timeperiod to compare with the prior transmission of email. Each emailand/or its respective attachment is identified with a unique identifierso it may be tracked through the system. Various statistics relating tothe emails are gathered. The probability that some aspect of the emailtransmission, e.g. an attachment, an email transmission, is violative ofan email security policy is estimated by applying the model based on thestatistics that have been gathered. Whether the email transmission isclassified as violative of the email security policy is then transmittedto the other clients.

The system 10, as illustrated in FIG. 1, has two primary components, oneor more clients 20 and one or more servers 40. The client 20 is definedherein as a program integrated with an email server 22, which monitorsand logs email traffic 50 for one or more email accounts 26, and whichgenerates reports that are sent to the server 40. The client 20 may runon a separate computer from the email server 22, or on the samecomputer. The server 40 may run at a central location and receivesreports from the client 20 in order to generate statistics and alertsabout violations of email security policy which are distributed back tothe clients 20.

The client 20 also includes a database 24, which stores informationabout all email attachments that pass through the mail server 22 to oneor more email accounts 26. (Transmission of the email to the respectiveaccount may be prevented if a violation of a security policy isdetected.) The system 10 contains a component to integrate with theemail sever 22. In an exemplary embodiment, the client 20 is integratedwith SENDMAIL using PROCMAIL. The client 20 also contains an analysiscomponent 28 to compute the unique identifiers for attachments. The dataanalysis component 28 extracts statistics from the database 24 to reportto the server 40. A communication component 30 handles the communicationbetween the client 20 and the server 40.

When integrated with the mail server 22, the client 20 processes allemail. Each email is logged in the database 24 along with a set ofproperties associated with that email including a unique referencenumber for that email, the sending email account, the recipient emailaccounts, the number of recipients, the number of attachments, if any,the time and date of the email, the size in bytes of the email body, thesize in bytes of the subject line, the number and list of “keywords” inthe email subject line or body, other linguistic features of the emailcontent (which may be a wide variety of features such as the number ofnouns, or noun phrases, and/or the frequency distribution of words, orthe frequency distribution of n-grams, or other such linguistic featurescommonly known in the state of the art), as well as other recordedproperties of the email (some that may be inferred by application of aprobabilistic, statistical or classification model which may label theemail with some category of interest).

The mail server 22 extracts attachments from the email, if any, andcomputes a unique identifier for each attachment. The name of theattachment or the subject of the email is typically not sufficientinformation for tracking because one virus may be sent under severaldifferent names and subject lines since these fields are easilyalterable by the malicious software. The system computes the MD5 hash ofevery binary attachment received to create the unique identifier, usingthe hexadecimal representation of the binary as input to the algorithm.(The MD5 is known in the art, and described in R. Rivest, “The MD5Message Digest Algorithm,” Internet RFC1321, Paril 1992, which isincorporated by reference in its entirety herein.) (Polymorphic viruseswill have different identifiers for each instance of the virus.) Aprobabilistic model for the attachments may be created by training aNaive Bayes model on a training set of email attachments, described inU.S. patent application No. [not yet known], filed Jul. 30, 2002,entitled “System and Methods for Detection of New MaliciousExecutables,” which is incorporated by reference above.

This unique identifier is used to aggregate information about the sameattachment propagated in different emails. This step if most effectiveif payload, e.g., the content of the email, such as the body, thesubject, and/or the content of the attachment, is replicated withoutchange during virus propagation among spreading emails and thus trackingthe email attachments via this identifier is possible.

The client 20 stores a record containing the identifier and otherinformation and statistics for each email and attachment in the database24. This information is typically transmitted to the server 40, and suchinformation is also transmitted from the server 40 to the client 20 forinformation that is received from other clients 20, or where identifiersor models have been updated. By querying the database 24 with a list ofthe identifiers for known programs that are “malicious,” e.g., thatviolate the security policy, the administrator can determine the pointsof entry of emails having such programs as attachments into a network,and can maintain a list of the senders and recipients of these emails.Even if a logged attachment was not initially acknowledged as maliciousbut only later categorized to be so, since a record of all attachmentsis stored in the database the points of entry can still be recovered.

System 10 allows the system administrator to distinguish between emailtraffic containing non-malicious email attachments and email trafficcontaining malicious software attachments. Malicious programs thatself-replicate will likely propagate at a significantly different ratethan regular attachments sent within the environment in which the system10 is installed. These differences may become more apparent as all emailis monitored, and (temporal) statistics are gathered carefully withinthat environment to establish norms for email flows, as will bedescribed below.

The system 10 uses the information stored in the database in severalways. Since the system 10 can determine the points of entry of amalicious attachment into a network, e.g., the recipient email account26 and/or the client 20 associated with the email account 26, this cangreatly assist the cleanup associated with an email virus incident andcan help the system administrator reduce and contain the associateddamage.

In addition, the client 20 gathers statistics about the propagation ofeach malicious attachment through the site which is shared with theserver 40. The system may define an attachment as malicious or benign byextracting features of the attachment, and using a probabilistic modelto determine whether the attachment is malicious or benign. A procedurefor classifying attachments is described in U.S. patent application No.[not yet known], filed Jul. 30, 2002, entitled “System and Methods forDetection of New Malicious Executables,” which is incorporated byreference above.

The system also may define a probabilistic or statistical model relatingto the behavior of attachments derived from these statistics orfeatures. This allows a global view of the propagation of maliciousattachments and allows the system 10 to quantify the threat of theseattachments as described below. Some statistics that are reported foreach malicious attachment is the prevalence of an attachment and thebirth rate of an attachment. The prevalence is the number of occurrencesan attachment was observed by the client 20 and the birth rate is theaverage number of copies of the attachment which are transmitted fromthe same email account 26. Both of these statistics can be easilyobtained from the database 24.

Self-replicating viruses naturally have extremely high birth rates. If aclient 20 detects an attachment with a very high birth rate, the client20 can warn the server 40 that this attachment is a potential selfreplicating virus. The server 40 can in turn warn other clients 20 aboutthis attachment which can reduce the spread of these types of viruses.

Many self-replicating viruses have a similar method of propagation,i.e., they transmit themselves to email addresses found on the addressbook of the host computer. This behavior may manifest itself in anextremely high birth rate for the attachment. While in some cases alarge birthrate for an attachment would be normal, such as in abroadcast message, self-replicating viruses are characterized in thatthe message is transmitted from multiple email accounts 26. In fact, thenumber of email accounts 26 that send the message depends on the numberof email accounts 26 that open the attachment.

An exemplary method for detecting self-replicating viruses is toclassify an attachment as self replicating if its birth rate is greaterthan some threshold t and the attachment is sent from at least l emailaccounts. If an email flow record is above the threshold t, the client20 notifies the server 40 with the unique identifier of the attachment.The server 40 propagates the unique identifier to the clients 20 whichinstruct the mail server 24 to block all emails that contain anattachment with this unique identifier. In practice, these mails can bequeued until a system administrator can determine whether or not theyare malicious.

The server 40 runs at a central location and communicates with theclients 20 deployed at various mail servers 22. The server 40 cantypically be operated by a trusted third party and various networks canmake agreements with this third party to provide the services describedherein.

The server 40 has several functions. The server 40 may be responsiblefor propagating an updated list of unique identifiers associated withknown malicious viruses to the clients 20. This propagation is automatedwhich allows for rapid update of the clients 20 immediately when a newmalicious virus is discovered. The server 40 is responsible foraggregating statistics obtained from the reports from clients 20 whichallows the system 10 to monitor violations of security policies at aglobal level. The information contained in each record is shown in FIGS.2-3, which illustrates screens of the user interface for system 10. Thefields correspond to information that the server 40 needs to eitherquery the client 20 for more information, or to compute basic aggregatestatistics.

Screen 200 (FIG. 2) displays information concerning all emails which aretransmitted through the system. For each email, a reference code 202 isassigned, the sender email account 204, the recipient email account 206,and the number of recipients 208 are noted. Also indicated is the numberof attachments 210, the size of the email 212, and the time and date 214of transmission. Finally, the email is classified as “interesting” or“not interesting” or a similar category, such as malicious, benign, orborderline, as will be described in greater detail below.

Screen 250 (FIG. 3) illustrates a number of features that may be storedand displayed for each email. For example, further information on thesender 252, e.g., sender's email, sender's name, etc., and informationon the recipient 254, e.g., recipient's email, recipient's name, etc.,may be stored and displayed. However, it is also important in certaincontexts to maintain the identify of email accounts in confidence. It istherefore important to have a de-identified user account which tracks aparticular account, but which does not reveal the identity of theaccount. A privacy feature is accomplished in the exemplary embodimentby way of an MD5 hash algorithm, as described above, or equivalent whichis applied to each email address, thereby creating a unique alphanumericidentifier 256 for the email, but which does not reveal the emailaddress. Alternatively an alphanumeric code may be similarly created forthe email address of the sender (not shown). The sender information 252is blank in screen 250. This may of de-identifying email may be a usefulfeature for a security personnel working with the system who may nothave authorization to know the true email addresses that may causealerts. In such instance, a higher authority may be required to inspectany such alerts and would have access to the mapping from the real emailaddress to the unique identifier.

Information concerning attachments as illustrated in FIG. 4. Screen 260of the user interface of the exemplary embodiment illustrates that eachattachment is represented by a unique MD5 hash identifier 262, asdiscussed above. Information regarding the transmission of theattachment is stored and illustrated in table 264. In particular, table264 duplicates some of the information of screen 200 (FIG. 2) andindicates the sender email account 266, the recipient email account 268,and the time and date of transmission 270 of each email which includedthe attachment. Further information recorded is the number of recipients272 of the particular email that included the attachment, the totalnumber of attachments 274 in that email, and the size of the attachment276. Further information is the level of “interest” 278 of theattachment, which is a numerical figure generated, for example, by aprobabilistic model such as Naive Bayes, regarding whether theattachment is malicious, benign or borderline, as determine by a virusscanner, or by the technique described in U.S. patent application No.[not yet known], filed Jul. 30, 2002, entitled “System and Methods forDetection of New Malicious Executables,” which is incorporated byreference above. Table 280 includes the classification malicious, benignor borderline, which is derived from the level of interest 278, above.Additional information about the birthrate, and other statistics aboutthe attachment are recorded and displayed in screen 260.

This information may be stored on database 24 of client 20 anddistributed to the server 40 (and database 42), and in turn to othersclients 20, which could update its local database 24 by including theunique attachment identifier along with its classification as malicious,so that any future emails that appear with an attachment whose MD5 hashmatches the unique identifier would cause each client to alert on thatemail as containing a malicious attachment. MySQL, for example, may beused in the exemplary embodiment, which is a well-known open sourcedatabase system.

The server 40 also contains a data analysis component 44 which performsthe analysis over these records, such as computation or updating ofstatistics in the database 42 about attachments or emails, as well asapplication of probabilistic or statistical models or tests in order togenerate alerts of emails or attachments that violate security policy.For example, a model which is used to classify an attachment as benign,malicious, or borderline may be performed at the data analysis component44. This model may be updated with additional training data, which maybe different from the model that is used to classify attachments at theclient 20. A communication component 46 manages the communication withmultiple clients 20. The communication between the server 40 and theclient 20 consists of messages passed on a secured channel usingencryption and authentication mechanisms.

When a client 20 reports an incident of a received email attachment thatis violative of a security policy, it may report a unique incidentidentification number, the unique identifier of the attachment, the dateand time of the attack, the prevalence, and the birth rate.

Additional statistics may be computed for each attachment and stored ondatabases 24/42 and displayed, for example, in table 280 of screen 260of the user interface. A virus incident is the fraction of the totalnumber of clients 20 within an organization infected by a particularvirus, due to a single initial infection from outside the organization.Since each attachment is saved in the local database 24 with a Uniqueidentifier and malicious or benign classification, this value is simplythe number of times each malicious unique identifier appears in thelocal database 24. The lifespan is the length of time a virus is active.This value is calculated by subtracting the first time a virus is seenfrom its last occurrence in the local repository. This values reportsthe amount of time a virus was free to cause damage to a network beforeit was detected. The Incident rate is the rate at which virus incidentsoccur in a given population per unit time, normalized to the number ofclients 20 in the population. This is calculated by the server 40 basedon the virus incident values reported by the local server. The deathrate is the rate at which a virus is detected. This is calculated by theserver 40 by taking the average lifespan of the virus. The systemprevalence is a measure at the system level of the total number ofclients 20 infected by a particular virus. This value is calculated bythe central repository by summing over the number of local hostsreporting the same virus. The threat is the measure of how much of apossible danger a virus may be. In an exemplary embodiment, threat iscalculated as the incident rate of a virus added to the prevalence of avirus divided by the total number of participating clients 20 and thetotal number of viruses. Spread is a measure of the global birth rate ofa virus. This is calculated by taking the average of the birth ratesreported by the participating clients 20. These metrics may be directlyimplemented by computing SQL aggregates over the databases (both local24 and central 42). Each time a client 20 determines that an attachmentis a virus, it sends a report to the server 40, and the server 40updates it statistics for that virus.

The system 10 may also gather statistics about the behavior and featuresof individual email accounts 26, which is a representation of the usersof these accounts. The information gathered about individual emails, aswell as email accounts themselves, is useful to detecting violations ofan email security policy. For example, email account statistics may bederived for recipient and sender email addresses recorded in thedatabase. The statistics gathered about the prior transmission of emailto and from a particular email account can be used as training data tocreate a probabilistic or statistical model of an email account. Thismodel provides a profile of the past or baseline behavior patterns of aparticular email account. The selected behavior may refer to aparticular time frame of interest, e.g., the previous month. Where theselected behavior of the particular email account deviates from thisprofile of prior or baseline behavior, the system 10 may issue an alertthat a violation of an email security policy has occurred.

This profile of behavior patterns may be represented as a histogram, forexample. A histogram is a way of graphically showing the characteristicsof the distribution of items in a given population of samples. In theexemplary embodiment, histograms are used to model the behavior ofparticular email accounts. From a training set, e.g., the statistics asdiscussed above, a histogram is constructed to represent the baselinebehavior of an email account. A histogram is also created to representselected behavior of the email account.

Histograms may model statistics, e.g., events or operations, which areaccumulated over a fixed time period. Each bin in the histogram countssome number of events in fixed time periods. For example, a histogrammay record the average number of emails sent by an email account eachday during the previous month, wherein each bin represents a day, hour,or other time period. Alternatively, histograms may model statisticsaccumulated irrespective of a time period. In such case, each bin is nota fixed time period, but some other feature. For example, over a set ofemails from an arbitrary time period (gathered over a month, or gatheredover a year, etc.) a histogram recording the number of email sent to adistinct recipient, wherein each bin represents a recipient, forexample.

FIG. 5 illustrates a screen 300 in the user interface of the exemplaryembodiment, which illustrates histograms that may be stored for an emailaccount 302 In the example, statistics are gathered for an email account302 over a predetermined period of time, e.g., the previous twelvemonths. The system counts the number of emails sent by this emailaccount 302 to a specific recipient. Table 304 shows each recipientemail address 306 and the relative frequency 308 at which user account302 has emailed each recipient. In histogram 310, each recipient wouldbe considered a bin 312, which indicates the frequency of emails 314 foreach recipient. If an email account has sent emails over the past twelvemonths to 900 different email accounts, for example, then the emailaccount's profile histogram would have 900 bins. A histogram computedover the twelve months would serve as a statistical model of baselinebehavior of the email account. The histogram's bins can be ordered from“most frequent” recipient to “least frequent” recipient and displaythese as a bar graph 310 (as in FIG. 5), or alternatively, thestatistics may be represented as a continuous function or a plottedgraph. The bins of the histogram may be ordered differently, by forexample, sorting the recipient names, or grouping recipients accordingto email domain. A histogram of selected behavior may include bins foreach email recipient, and taken over the selected time period.

A sequential profile can be represented which is irrespective of thequanta of time measured (non-stationary), but which instead uses eachemail as a measurement point. With continued reference to FIG. 5, plot320 illustrates the number of recipients 322 who received email fromuser account 302. The list grows over the history of recorded emails asmore emails 324 are sent. Graph 320 monotonically increases for eachsequential email measured. The growth rate of this plot indicates aprofile of the email account. A plot that is very slowly increasingindicates that the email account does not exchange emails with very manynew email accounts. While another email account may have a very fastgrowing profile, perhaps indicating that the user of the email accountmay be contacted by very many new people. A histogram for normalbehavior may be taken over one time period, and histogram for newbehavior may be taken over a second time period. Graph 330 illustratesthe distinct number of recipient per 50 emails sent (dashed line 332)and the distinct number of recipients per 20 emails sent (dotted line334). As another example, the first 100 emails sent in order over sometime period by an email account were sent to ten distinct emailaddresses. In the 101^(st)-110^(th) emails, no new email addresses areseen that are distinct from those seen in the first 100 emails. However,two new distinct email addresses are seen in the 112^(th) email. Forthis email, we have a net gain of two more emails. Such growth rates arestatistics that may be used to detect violations of security policy.

Once such histograms have been created, the histogram of the baselinebehavior is compared with the histogram of the selected behavior todetermine whether the new behavior represents a deviation that may beclassified as a violation of email security policy. There are many knownmethods to compute the histogram dissimilarity. Generally such methodsmay be divided into two categories: One method is using a histogramdistance function; the other method is to use a statistics test. Ahistogram can be represented by a vector.

Histograms may be compared with the L1 form distance equation. Histogramintersection is represented in equation (1), where X and Y are vectorsrepresenting the normal behavior histogram and the new behaviorhistogram. M is the number of bins in histogram.

$\begin{matrix}{{L\left( {X,Y} \right)} = {1 - \frac{\sum\limits_{i = 0}^{M - 1}\;{\min\left( {{X\lbrack i\rbrack},{Y\lbrack i\rbrack}} \right)}}{\min\left( {{\sum\limits_{i = 0}^{M - 1}\;{X\lbrack i\rbrack}},{\sum\limits_{i = 0}^{M - 1}\;{Y\lbrack i\rbrack}}} \right)}}} & (1)\end{matrix}$When the sums of X[i] and Y[i] are equal, the histogram intersectionformula of equation (1) may be simplified to the L1 form distanceequation (2):

$\begin{matrix}{{L_{1}\left( {X,Y} \right)} = {\sum\limits_{i = 0}^{M - 1}\;{{{X\lbrack i\rbrack} - {Y\lbrack i\rbrack}}}}} & (2)\end{matrix}$

Alternatively, histograms may be compared with the L2 form distanceequation (3):

$\begin{matrix}{{L_{2}\left( {X,Y} \right)} = {\sum\limits_{i = 0}^{M - 1}\;\left( {{X\lbrack i\rbrack} - {Y\lbrack i\rbrack}} \right)^{2}}} & (3)\end{matrix}$The L1 and L2 form equations assume that the individual components ofthe feature vectors, e.g., the bins of the histograms, are independentfrom each other. Each of the bins are taken to contribute equally to thedistance, and the difference of content between the various bins isignored.

Other distance equations are the weighted histogram differenceequations, e.g., the histogram quadratic distance equation and thehistogram Mahalanobis distance equation. The histogram quadraticdifference equation (4) considers the difference between different bins.D(X,Y)=(X−Y)^(T) A(X−Y)  (4)

In equation (4), A is a matrix and a_(ij) denotes the similarity betweenelements with index i and j. A symmetry is assumed, such thata_(ij)=a_(ji) and a_(ii)=1.

The Mahalanobis distance is a special case of the quadratic distanceequation. The matrix A is given by the covariance matrix obtained from aset of training histograms. Here, the elements in the histogram vectorsare treated as random variables, i.e., X=[x₀, x₁, . . . , x_(M-1)]. Thecovariance matrix B is defined as b_(ij)=Cov(x_(i), x_(i)). The matrix Ais thus defined as A=B⁻¹. When the x_(i) are statistically independent,but have unequal variance, matrix B is a diagonal matrix:

$\begin{matrix}{B = \begin{bmatrix}{\sigma_{0}^{2},0,0,\ldots\mspace{14mu},0} \\{0,\sigma_{1}^{2},0,\ldots\mspace{14mu},0} \\{0,{\ldots\mspace{14mu} 0},0} \\{0,{\ldots\mspace{14mu} 0},0,\sigma_{M - 1}^{2}}\end{bmatrix}} & (5)\end{matrix}$This method requires a sufficiently large training set (of prior emailtransmission statistics) in order to allow the covariance matrix toaccurately represent the training data.

The chi-square test is used to test if a sample of data came from apopulation with a specific distribution. It can be applied to anyuni-variance distribution for which it is possible to calculate thecumulative distribution function. However, the value of chi-square teststatistic depends on how the data is binned, and it requires asufficient sample size. The chi-square test is represented by equation(6):

$\begin{matrix}{\chi^{2} = {\sum\limits_{i = 1}^{k}\;{\left( {O_{i} - E_{i}} \right)^{2}/E_{i}}}} & (6)\end{matrix}$where k is the number of bins O_(i) is the observed frequency for bin i,and E_(i) is the expected frequency. The expected frequency iscalculated as:E _(i) =N(F(Y _(u))−F(Y _(l))).  (7)where F is the cumulative distribution function, Y_(u) is the upperlimit for class i, Y_(l) is the lower limit for class i, and N is thesample size.

The Kolmogorov-Simironov test (the “KS test”) is a statistical testwhich is designed to test the hypothesis that a given data set couldhave been drawn from a given distribution, i.e., that the new behaviorcould have been drawn from the normal behavior. The KS test is primarilyintended for use with data having a continuous distribution, and withdata that is independent of arbitrary computational choice, such as binwidth. The result D is equal to the maximum difference between thecumulative distribution of data points.D=max{|F′(x)−F(x)|}, F′(x)=(num_of_samples≦x)/N  (8)and where N is total number of samples The KS test does not depend onthe underlying cumulative distribution function which is being tested,and it is an exact test (when compared with the Chi-Square test, whichdepends on an adequate sample size for the approximations to be valid).The KS test may only be applied to continuous distribution; it tends tobe more sensitive near of the center of the distribution than at thetails.

The modeling of the behavior of an email account may include defining amodel based on the time of day in which emails are transmitted by aparticular email account. FIG. 6 illustrates screen 400, which comparessuch email transmission for user account 402. Histogram 404 illustratesthe average number of emails 406 sent for each bin 408, which representseach hour of the 24 hours in a day. The data in histogram 404 isaccumulated for a predetermined period of time, e.g., the entire periodthat user account 402 has been tracked by the system 10 (time period410). Histogram 412 is created for email transmission during a selectedperiod of time being analyzed, e.g., the last month (time period 414).Histogram 412 illustrates the average number of emails 416 sent duringeach hour as represented by bins 418. The histogram 404 of baselinebehavior is compared with the histogram 412 of the selected behavior,with a comparison equation such as the Mahalanobis distance equation,above, to produce a distance result 320. A threshold is set, whichdetermines whether such a calculated difference is normal or maypossibly violate security policy. The threshold may be determined bytraining on known data representative of email account behavior whichviolated security policy, when compared with known, normal, emailbehavior. The histogram 404 of the baseline behavior of user emailaccount 302 shows that emails are rarely sent early in the morning.Thus, a violation in the security policy may be detected if a series ofemail are transmitted from user email account 302 at such time of day.Similarly, the modeling of the behavior of an email account may includedefining a model based on the size of the emails that are transmitted byan email account or on the number of attachments that are transmitted bythe email account

Another method for defining a model relating to the transmission ofemails from one of the email accounts is based on the email addresses ofthe recipients of emails transmitted by the particular email account.Thus, another statistic or feature gathered by the method in accordancewith the invention is the email addresses of recipients in each email.The recipients of the emails may be grouped into “cliques” correspondingto email addresses historically occurring in the same email.

A clique is defined as a cluster of strongly related objects in a set ofobjects. A clique can be represented as a subset of a graph, where nodesin the graph represent the “objects” and arcs or edges between nodesrepresent the “relationships” between the objects. Further, a clique isa subset of nodes where each pair of nodes in the clique share therelationship but other nodes in the graph do not. There may be manycliques in any graph.

In this context, the nodes are email addresses (or accounts) and theedges represent the “emails” (and or the quantity of emails) exchangedbetween the objects (email accounts). Each email account is regarded asa node, and the relationship between them is determined by the to:,from:, and cc: fields of the emails exchanged between the emailaccounts. As illustrated in FIG. 7, a selected email account 100 inducesits own set of cliques 110 a, 110 b, 110 c, which are clusters of emailaccounts 120 of which it is a member. Each member in the clique has beendetermined to historically exchange emails 130 with each other. Thismodeling of email cliques is based on the premise that a user's “socialcliques” and the nature of the relationship between members of a cliquecan be revealed by their “email cliques.”

The relationship between nodes that induces the cliques can be definedunder different periods of time, and with different numbers of emailsbeing exchanged, or other features or properties. For example, an edge(as represented by line 130 in FIG. 7) between email account UserA@z.comand email account UserB@z.com may be represented if UserA and UserB haveexchanged at least N emails over the time period T. (As one varies N,the cliques revealed may change.) As another example, an edge betweenUserC and UserD may be represented if they have exchanged at least Nemails with each other in the time period T, and each email is at leastK bytes long. Such features of emails are based upon the kind ofinformation an analyst may wish to extract from a set of emails. As afurther example, one may define the clique relationship to be the set ofaccounts that exchange at least N emails per time period T and whichinclude certain string of text S. (Further details concerning cliquefinding algorithms and related problems are disclosed in Cliques,Coloring and Satisfiability: Second Dimacs Implementation Challenge, D.Johnson and M. Trick, Ed., 1993, which is incorporated by reference inits entirety herein.)

FIG. 7 illustrates the email behavior of the user of email account 100.For example, the three clusters may represent cliques of socialacquaintances 110 a, clients 110 b, and coworkers 110 c. (Although fouremail accounts are shown in each clique 110 a, 110 b, and 110 c, it isunderstood that the number of email accounts may be larger or smallerdepending upon the historical email use of the particular emailaccounts.) Each of these groups of users with their own email accounts120, have a relationship with the user of email account 100. Members ofdifferent cliques, i.e., social acquaintances 110 a and clients 110 bare unlikely to have common interests or concerns. Thus, it is unlikelythat the user of email account 100 would send the same email to bothcliques. More particularly, it is unlikely that email account 100 wouldsend an email 140 addressed to both an email account in clique 110 a andan email account in clique 110 b (illustrated in dotted line).

Cliques are determined according to any number of known methods. In theexemplary embodiment, cliques are modeled as described in C. Bron and J.Kerbosch. “Algorithm 457: Finding All Cliques of an Undirected Graph,”Communications of ACM, 16:575-577, 1973, which is incorporated in TheAppendix and the attached routine Clique_finder.

First, the graph is built by selecting all of the rows from the emailtable in the database. As illustrated in FIG. 2, above each row containsthe sender 204, and the recipient 206. The subject line may also bestored (although not illustrated in FIG. 2).

A first step is to check an aliases file against the sender andrecipient to map all aliases to a common name. For instance, a singleuser may have several accounts. This information, if available, would bestored in an aliases file.

The edge between sender and recipient is updated (or added if it doesn'talready exist). (The edge is represented as line 130 in FIG. 7.) Eachedge of the graph may have associated with it (1) the number of emailsthat traversed that edge and (2) a weighted set of subject words whereeach word has a count of the number of times it occurred. The edge'sweight is incremented by one, and the weighted set of subject wordsassociated with the edge is augmented by the set of subject words fromthe current message. Cliques are represented in screen 500 of the userinterface in FIG. 8. Cliques 502, 504, and 506 are displayed, along withthe most common subject words in emails transmitted among members of theclique.

A next step is pruning the graph. The user inputs a minimum edge weight,or minimum number of emails that must pass between the two accounts toconstitute an edge, and any edges that don't meet that weight areeliminated. For example, the minimum number of emails may be determinedfrom the average number of emails sent by the email account over asimilar time period.

Subsequently, the cliques are determined. Throughout this process, thereexist four sets of data: (1) *compsub* represents a stack of email useraccounts representing the clique being evaluated. Every account in*compsub* is connected to every other account. (2) *candidates*represents a set of email user accounts whose status is yet to bedetermined. (3) *not* represents a set of accounts that have earlierserved as an extension of the present configuration of *compsub* and arenow explicitly excluded. (4) *cliques* represents a set of completedcliques

In the exemplary embodiment, these are implemented using the Java Stackand HashSet classes rather than the array structure suggested in theBron & Kerbosch in The Appendix and the routine Clique_finder attachedherein.

The algorithm is a recursive call to extendClique( ). There are fivesteps in the algorithm: Step 1 is the selection of a candidate, i.e., anemail user account which may be prospectively added to the clique. Step2 involves adding the selected candidate to *compsub*. Step 3 createsnew sets *candidates* and *not* from the old sets by removing all pointsnot connected to the selected candidate (to remain consistent with thedefinition), keeping the old sets intact. Step 4 is calling theextension operator to operate on the sets just formed. The duty of theextension operator is generate all extensions of the given configurationof *compsub* that it can make with the given set of candidates and thatdo not contain any of the points in *not*. Upon return, step 5 is theremoval of the selected candidate from *compsub* and its addition to theold set *not*.

When *candidates* and *not* are both empty, a copy of *compsub* is addedto *cliques*. (If *not* is non-empty it means that the clique in*compsub* is not maximal and was contained in an earlier clique.) Aclique's most frequent subject words are computed by merging and sortingthe weighted sets of subject words on each edge in the clique.

If we reach a point where there is a point in *not* connected to all thepoints in *candidates*, the clique determination is completed (asdiscussed in The Appendix). This state is reached as quickly as possibleby fixing a point in *not* that has the most connections to points in*candidates* and always choosing a candidate that is not connected tothat fixed point.

A clique violation occurs if a user email account sends email torecipients which are in different cliques. If an email 140 is detected,this occurrence of an email having a recipient in two different cliquesmay be considered a clique violation, and may indicate that either a)email account 100 made a mistake by sending an inappropriate message toeither a social acquaintance or to a client or b) a self-replicatingemail attachment has accessed the address book for the email account 100and is transmitting itself to email accounts in the address-book withoutknowledge the cliques 110 a, 110 b, 110 c of email account 100.

A strength of the clique violation may be measured by counting thenumber of such violations in a single email, e.g., the number ofrecipients who are not themselves part of the same clique, and/or thenumber of emails being sent, or other features that may be defined (asthe system designer's choice) to quantify the severity of the cliqueviolation. (For example, if email account 100 sent one message to 15recipients, and one of these recipients is not a member of a clique thatthe other 14 belong to, that may be considered a minor violationcompared with another email that is directed to 15 recipients none ofwhom are members of the same clique.) The strength of the violation maybe used to set conditions (or thresholds) which are used to providealerts in the system 10. Alerts may then be generated based upon thestrength of the violation. In another embodiment, those recipients thatreceive few emails from the sender may be weighted higher than thoserecipients that receive many emails from the sender.

Clique violations may also be determined from multiple email messages,rather than from just one email. For example, if a set of emails aresent over some period of time, and each of these emails are “similar” insome way, the set of email accounts contained in those emails can besubjected to clique violation tests. Thus, the email recipients of emailsent by a particular use is used as training data to train a model ofthe email account.

If a specific email account is being protected by this method ofmodeling cliques and detecting clique violations, such violations couldrepresent a misuse of the email account in question. For example, thisevent may represent a security violation if the VP of engineering sendsan email to the CEO concurrently with a friend who is not an employee ofthe VP's company. Similarly, a clique violation would occur when a navylieutenant sends a secret document to his commanding officer, with hiswife's email account in the CC field. These are clique violations thatwould trigger an alert.

The techniques described herein can also be used a) to detect spamemails (which may or may not and generally do not have attachments, andb) to detect spammers themselves. Spam generally has no attachments, soother statistics about email content and email account behavior areneeded to be gathered here by system 10 in order to also detect spam.Spam can be detected by considering clique violations. In particular, ifan email account sends or receives emails from other email accounts thatare not in the same clique, an alert may be issued which would indicatethat such email transmissions are likely spam.

The methods described above generally refer to defining probabilistic orstatistical models which define the behavior of individual emailaccounts. Also useful are models relating to statistics for emailstransmitted by the plurality of email accounts on the computer system.

Detecting email accounts that are being used by spammers may allow aninternet service provider or server 40 to stop spam from spreading fromtheir service by shutting down an email account that has been detectedas a generator of spam. To detect spammers, these email accounts wouldhave a certain profile of email use that may be regarded as a badprofile as determined by supervised machine learning process, forexample. Thus, the notion of profiling i.e., gathering statistics aboutan email account's behavior, is used here as well. According to thisembodiment, email profiles are compared to other email profiles, ratherthan comparing statistics about emails to profiles.

Individual profiles may be represented by histograms in screen 550 ofthe user interface as illustrated in FIG. 9 for user 552. Histogram 554indicates the average number of emails sent on particular days of theweek 556, and sorted in bins for daytime 558, evening 560, and night562. Similarly, histogram 564 indicates the average size (in bytes) ofemails sent on particular days of the week 566, and sorted in bins fordaytime 568, evening 570, and night 572. Histogram 574 indicates theaverage number of recipients for each email sent on particular days ofthe week 576, and sorted in bins for daytime 578, evening 580, and night582.

EXAMPLE

Detection of a “spammer” may be performed by comparing email accountprofiles, such as those illustrated in FIG. 9. The following threeprofiles, or models, are created from statistics gathered by the system:

Profile 1: Histogram of average number of emails sent per minute and perday by a user account computed over a one week period. (Table 1)

TABLE 1 Average Number of Emails Sent Account A Account B Per minute 0.5100 Per day 11 12,000

Profile 2: Histogram of average number of recipients per email formorning, day, night. (Table 2)

TABLE 2 Average Number of Recipients of Email by Time of Day Account AAccount B Morning 1 15 Day 5 15 Night 1 15

Profile 3: Histogram of cumulative number of distinct email accountrecipients per email sent (which may be plotted as a function, or evenrepresented by a closed form functional description modeled as a linearfunction, or a quadratic function, etc.)

TABLE 3 Cumulative Distinct Email account recipients Account A Account BEmail 1 1 15 Email 2 1 27 Email 3 2 43 . . . . . . . . . Email 55 71236 

Given these three profiles, Account A appears to have a profile showingvery modest use of emails, with few recipients. Account B on the otherhand appears to be a heavy transmitter of emails. In addition, thereseems to be evidence that the behavior of Account B is indicative of a‘drone’ spammer. Such determination may be made by comparing thehistograms of Account A (considered a “normal” user) with the histogramsof Account B, and determining the difference between the two. Equations(1)-(8), above, are useful for this purpose. For example, the histogramof Table 2 indicates that the behavior of Account B may be consistentwith running a program that is automatically sending emails to a fixednumber of recipients (e.g., 15), and the histogram of Table 3 indicatesthat there is a very large number of email addresses in Account B'saddress book. In the illustration, Account B has already generated 1236distinct addresses by email 55. The inference can therefore be made thatAccount B is a spammer. This type of profile can be used to find othersimilar profiles of other accounts indicative of other spammers.

It will be understood that the foregoing is only illustrative of theprinciples of the invention, and that various modifications can be madeby those skilled in the art without departing from the scope and spiritof the invention.

APPENDIX

-   Adapted from C. Bron and J. Kerbosch. “Algorithm 457: Finding All    Cliques of an Undirected Graph,” Communications of ACM, 16:575-577,    1973,

A maximal complete subgraph (clique) is a complete subgraph that is notcontained in any other complete subgraph. Two backtracking algorithmsare presented using a branch-and-bound technique (as discussed inLittle, John et al., “An algorithm for the traveling Salesman Problem,”Oper. Res. 11 (1963), 972-989) to cut off branches that cannot lead to aclique.

The first version is a straightforward implementation of the basicalgorithm. It is mainly presented to illustrate the method used. Thisversion generates cliques in alphabetic (lexicographic) order.

The second version is derived from the first and generates cliques in arather unpredictable order in an attempt to minimize the number ofbranches to be; traversed. This version tends to produce the largercliques first and to generate sequentially cliques having a large commonintersection. The detailed algorithm for version 2 is presented here.

Description of the algorithm—Version 1. Three sets play an importantrole in the algorithm. (1) The set compsub is the set to be extended bya new point or shrunk by one point on traveling along a branch of thebacktracking tree. The points that are eligible to extend compsub, i.e.that are connected to all points in compsub, are collected recursivelyin the remaining two sets. (2) The set candidates is the set of allpoints that will in due time serve as an extension to the presentconfiguration of compsub (3) The set not is the set of all points thathave at an earlier stage already served as an extension of the presentconfiguration of compsub and are now explicitly excluded. The reason formaintaining this set not will soon be made clear.

The core of the algorithm consists of a recursively defined extensionoperator that will be applied to the three sets just described. It hasthe duty to generate all extensions of the given configuration ofcompsub that it can make with the given set of candidates and that donot contain any of the points in not. To put it differently: allextensions of compsub containing any point in not have already beengenerated. The basic mechanism now consists of the following five steps:

-   -   Step 1. Selection of a candidate.    -   Step 2. Adding the selected candidate to compsub.    -   Step 3. Creating new sets candidates and not from the old sets        by removing all points not connected to the selected candidate        (to remain consistent with the definition), keeping the old sets        in tact.    -   Step 4. Calling the extension operator to operate on the sets        just formed.    -   Step 5. Upon return, removal of the selected candidate from        compsub and its addition to the old set not.

The extra labor involved in maintaining the sets not is now described. Anecessary condition for having created a clique is that the setcandidates be empty; otherwise compsub could still be extended. Thiscondition, however, is not sufficient, because if now not is nonempty,from the definition of not indicates that the present because if now notis nonempty, from the definition of not indicates that the presentconfiguration of compsub has already been contained in anotherconfiguration and is therefore not maximal. Compsub is considered aclique as soon as both not and candidates are empty.

If at some stage not contains a point connected to all points incandidates, it can be predicted that further extensions (furtherselection of candidates) will never lead to the removal (in Step 3) ofthat particular point from subsequent configurations of not and,therefore, not to a clique. This is the branch and bound method whichenables detection in an early stage of branches of the backtracking treethat do not lead to successful endpoints.

The set compsub behaves like a stack and can be maintained and updatedin the form of a global array. The sets candidates and not are handed tothe extensions operator as a parameter. The operator then declares alocal array, in which the new sets are built up, that will be handed tothe inner call. Both sets are stored in a single one-dimensional arraywith the following layout:

| not | candidates index values: 1.....ne............ce....

The following properties obviously hold:

1. ne ≦ ce 2. ne = ce:empty (candidates) 3. ne = 0 :empty (not) 4. ce =0 :empty (not) and empty (candidates) = clique foundIf the selected candidate is in array position ne+1, then the secondpart of Step 5 is implemented as ne:=ne+1.

In version 1 we use element ne+1 as the selected candidate. Thisstrategy never gives rise to internal shuffling, and thus all cliquesare generated in a lexicographic ordering according to the initialordering of the candidates (all points) in the outer call.

Description of the algorithm—Version 2. This version does not select thecandidate in position ne+1, but a well-chosen candidate from position,say s. In order to be able to complete Step 5 as simply as describedabove, elements s and ne+1 will be interchanged as soon as selection hastaken place. This interchange does not affect the set candidates sincethere is not implicit ordering. The selection does affect, however, theorder in which the cliques are eventually generated.

The term “well chosen” is now explained. The object is to minimize thenumber of repetitions of Steps 1-5 inside the extension operator. Therepetitions terminate as soon as the bound condition is reached. Thiscondition is formulated as: there exists a point in not connected to allpoints in candidates. We would like the existence of such a point tocome about at the earliest possible stage.

Is is assumed that with every point in not is associated a counter,which counts the number of candidates that this point is not connectedto (number of disconnections). Moving a selected candidate into not(this occurs after extension) decreases by one all counters of thepoints in not to which it is disconnected and introduces a new counterof its own. Note that no counter is ever decreased by more than one atany one instant. Whenever a counter goes to zero the bound condition hasbeen reached.

One particular point in not is fixed. If candidates disconnected to thisfixed point are selected repeatedly, the counter of the fixed point willbe decreased by one at every repetition. No other counter can go downmore rapidly. If, to begin with, the fixed point has the lowest counter,no other counter can reach zero sooner, as long as the counters forpoints newly added to not cannot be smaller. We see to this requirementupon entry into the extension operator, where the fixed point is takeneither from not or from the original candidates, whichever point yieldsthe lowest counter value after the first addition to not. From thatmoment on this one counter is maintained, decreasing it for every nextselection, since only select disconnected points are selected.

The Algol 60 implementation of this version is given below. Theimplementation in the exemplary embodiment is Clique_finder in theattached computer listing.

Algorithm

procedure output maximal complete subgraphs 2(connected, N);   value N;integer N;   Boolean array connected; comment The input graph isexpected in the form of a symmetrical   boolean matrix connected. N isthe number of nodes in the   graph. The values of the diagonal elementsshould be true; begin   integer array ALL, compsub [1 : N];   integer c;  procedure extend version 2(old, ne, ce);     value ne, ce; integer ne,ce;     integer array old;   begin     integer array new [1 : ce];    integer nod, fixp;     integer newne, newce, i, j, count, pos, p, s,sel, minnod;     comment The latter set of integers is local in scopebut need not be      declared recursively;     minnod : = ce; i := nod := 0; DETERMINE EACH COUNTER VALUE AND LOOK FOR MINIMUM:    for i := i +1 while i ≦ ce

 minnod 0 do    begin     p : = old[i]; count :=0; i := ne; COUNTDISCONNECTION:    for j : = j + 1 while j ≦ ce /\ count < minnod do     if ┐ connecte[p, old[j]] then      begin      count :=count + 1;SAVE POSITION OF POTENTIAL CANDIDATE:      pos : = j      end; TEST NEWMINIMUM:      if count < minnod then     begin       fixp : = p; minnod: = count;     if i ≦ ne then s : = pos     else     begin s : = i;PREINCR: nod : = 1 end    end NEW MINIMUM;    end i;    comment If fixedpoint initially chosen from candidates then number   of disconnectionswill be preincreased by one; BACKTRACKCYCLE:    for nod : = minnod + nodstep − 1 until 1 do    begin INTERCHANGE:    p : = old[s]; old[s] : =old[ne + 1];    sel : = old [ne + 1] : = p; FILL NEW SET not:    newne := i : = 0;    for i : = i + 1 while i ≦ ne do     if connected [sel,old[i]] then     begin newne : = newne + 1; new[newne]: : = old[i] end;FILL NEW SET cand:    newce : = newne; i : = ne + 1;    for i : = i + 1while i ≦ ce do     if connected[sel, old[i]] then     begin newce : =newce + 1; new[newce] : = old[i] end; ADD TO compsub:    c : = c + 1;compsub [c] : = sel;    if newce = 0 then    begin      integer loc;    outstring (1, ‘clique = ’);     for loc : = 1 step 1 until c do       outinteger (1, compsub[loc])    end output of clique    else   if newne < newce then extend version 2(new, newne, newce); REMOVEFROM compsub:    c : = c − 1; ADD TO not:    ne : = ne + 1;    if nod >1 then    begin SELECT A CANDIDATE DISCONNECTED TO THE FIXED POINT:    s: = ne; LOOK: FOR CANDIDATE:     s : = s + 1;     if connected[fixp,old[s]] then go to LOOK    end selection     end BACKTRACKCYCLE    endextend version 2;    for c : = 1 step 1 until N do ALL[c] : = c;    c := 0; extend version 2 (ALL, 0, N) end output maximal complete subgraphs2;

What is claimed is:
 1. A method for monitoring transmission of emailthrough a computer system, said computer system comprising a server andone or more clients having an email account, the method comprising: (a)gathering statistics relating to the transmission behavior of prioremails relating to a first email account on said computer system; (b)generating a profile relating to the transmission behavior of emailrelating to said first email account based on said statistics, whereingenerating a profile comprises grouping email addresses into one or morecliques based on the prior occurrence of said email addresses within thesame emails in a group of emails; (c) gathering statistics relating tothe transmission of selected email between said first email account andone or more additional email accounts; and (d) comparing said statisticsrelating to the transmission behavior of selected email with saidgenerated profile.
 2. The method according to claim 1, wherein gatheringstatistics relating to the transmission behavior of prior emailscomprises gathering statistics relating to the email addresses of emailssent to said first email account.
 3. The method according to claim 1,wherein gathering statistics relating to the transmission behavior ofprior emails comprises gathering statistics relating to the emailaddresses of email sent by said first email account.
 4. The methodaccording to claim 1, wherein gathering statistics relating to thetransmission behavior of prior emails comprises gathering statisticsrelating to the number of emails sent by said first email account. 5.The method according to claim 1, wherein gathering statistics relatingto the transmission behavior of prior emails further comprises gatheringstatistics relating to the number of emails transmitted between saidfirst email account and said one or more additional email accounts. 6.The method according to claim 1, wherein generating a profile relatingto the transmission behavior of email further comprises grouping saidone or more additional email accounts according to the domain of each ofsaid additional email accounts.
 7. The method according to claim 1,wherein gathering statistics relating to the transmission behavior ofprior emails further comprises assigning a unique identifier to eachemail sent to said first email account.
 8. The method according to claim1, wherein gathering statistics relating to the transmission behavior ofprior emails further comprises assigning a unique identifier to eachemail sent between said first email account and one or more additionalemail accounts.
 9. The method according to claim 1, wherein gatheringstatistics relating to the transmission behavior of prior emails furthercomprises assigning a unique identifier to each email sent to said firstemail account.
 10. The method according to claim 1, wherein gatheringstatistics relating to the transmission behavior of prior emails furthercomprises assigning a unique identifier to each email sent between saidfirst email account and one or more additional email accounts.
 11. Amethod for monitoring transmission of email through a computer system,said computer system comprising a server and one or more clients havingan email account, the method comprising: (a) defining a model relatingto prior transmission of email through said computer system derived fromstatistics relating to transmission behavior of prior emails transmittedthrough said computer system; (b) generating a baseline profile relatingto the normal transmission behavior of email through said computersystem, wherein said baseline profile comprises a histogram of saidnormal transmission behavior of email through said computer system; and(c) based on said histogram, making a determination regarding saidnormal transmission behavior of email through said computer system. 12.The method according to claim 11, where said model relating to priortransmission of email is based on the number of emails transmittedthrough said computer system during a specified period of time.
 13. Themethod according to claim 11, wherein making a determination comprises:(a) gathering statistics relating to transmission behavior of selectedemail through said computer system; and (b) comparing said statisticsrelating to transmission behavior of said selected email with saidbaseline profile.
 14. The method according to claim 13, whereingathering statistics relating to transmission behavior of selected emailthrough said computer system further comprises defining a histogram ofsaid transmission behavior of selected email through said computersystem.
 15. The method according to claim 14, wherein comparing saidstatistics relating to transmission behavior of said selected email withsaid baseline profile comprises comparing said histogram of said normaltransmission behavior of email to said histogram of said transmissionbehavior of selected email through said computer system.
 16. The methodaccording to claim 15, wherein comparing said histogram of said normaltransmission behavior of email to said histogram of said transmissionbehavior of selected email comprises performing a Mahalanobis distanceanalysis.
 17. The method according to claim 15, wherein comparing saidhistogram of said normal transmission behavior of email to saidhistogram of said transmission behavior of selected email comprisesperforming a Kolmogorov-Simironov test.
 18. The method according toclaim 15, wherein comparing said histogram of said normal transmissionbehavior of email to said histogram of said transmission behavior ofselected email comprises performing a Chi-square test.
 19. The methodaccording to claim 16 further comprising setting a threshold value andcomparing said histogram difference to said threshold value to determinewhether selected email transmission behavior is normal.
 20. The methodaccording to claim 17 further comprising setting a threshold value andcomparing said histogram difference to said threshold value to determinewhether selected email transmission behavior is normal.
 21. The methodaccording to claim 18 further comprising setting a threshold value andcomparing said histogram difference to said threshold value to determinewhether selected email transmission behavior is normal.